/**
 * @license
 * Copyright 2024 The Model Explorer Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ==============================================================================
 */

.container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;

  canvas.main {
    /* stylelint-disable-next-line declaration-no-important -- override default */
    width: 100% !important;
    /* stylelint-disable-next-line declaration-no-important -- override default */
    height: 100% !important;
    box-sizing: border-box;
  }

  canvas.snapshot,
  canvas.download-png {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 400px;
    height: 300px;
    border: 1px solid red;
    box-sizing: border-box;
    background-color: white;
    display: none;
  }

  .io-picker,
  .group-node-icon,
  .subgraph-indicator {
    position: absolute;
    box-sizing: border-box;
    display: flex;
    background-color: transparent;
  }

  .group-node-icon,
  .io-picker {
    z-index: 100;
  }

  .group-node-icon-tooltip,
  .io-picker-tooltip {
    position: absolute;
    z-index: 50;
  }

  .subgraph-indicator-menu-trigger,
  .more-actions-menu-trigger {
    position: absolute;
    visibility: hidden;
  }

  .flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    box-sizing: border-box;
    border: 5px solid var(--me-primary-color);
    pointer-events: none;
    opacity: 0;
  }

  @keyframes flashing {
    5% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }

  .flashing {
    animation: flashing 300ms ease-out;
  }

  .fps {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 100;
    font-size: 32px;
    border: 1px solid #777;
    padding: 8px;
    border-radius: 4px;
    background-color: white;
  }
}

::ng-deep .multiline-tooltip {
  white-space: pre-line;
}

::ng-deep .multiline-tooltip-left {
  white-space: pre-line;

  > div {
    text-align: left;
  }
}

::ng-deep .model-explorer-menu-item-with-icon {
  font-family: 'Google Sans Text', Arial, Helvetica, sans-serif;
  display: flex;
  align-items: center;
  font-size: 12px;
  padding: 5px 8px;
  line-height: 15px;
  letter-spacing: normal;

  mat-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    color: var(--me-on-surface-low-color);
  }

  &:hover {
    background-color: var(--me-surface-container-high-color);
  }
}

::ng-deep .model-explorer-alt-click-info {
  height: 32px;
  min-height: 32px;
  background-color: var(--me-surface-container-low-color);
  border-top: 1px solid var(--me-outline-variant-color);
  box-sizing: border-box;
  padding: 0 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  color: var(--me-on-surface-variant-color);
  margin-bottom: -8px;
}

::ng-deep .more-actions-menu,
::ng-deep .subgraph-menu {
  /* stylelint-disable-next-line declaration-no-important -- override MDC */
  background-color: var(--me-surface-container-low-color) !important;

  /* stylelint-disable-next-line declaration-no-important -- override MDC */
  color: var(--me-on-surface-color) !important;
}
